
import '../utils/Settings.dart';
import '../utils/dio/DioMethod.dart';
import '../utils/dio/DioUtil.dart';

class ReportApi{

  ///查询所有需要处理的报警
  static const needHandleAlarmUrl = "${Settings.appServer}/ThReportController/queryNeedHandleAlarmCount";

  ///查询所有报警次数和设备数量
  static const eqAndAlarmCountUrl = "${Settings.appServer}/ThReportController/queryEqAndAlarmCount";

  ///查询一段时间内，某一个设备的温湿度变化
  static const queryTHByDeviceNoUrl = "${Settings.appServer}/ThReportController/queryTHByDeviceNo";

  ///查询所有需要处理的报警
  static dynamic needHandleAlarm ()async{
    return await DioUtil.getInstance().request(needHandleAlarmUrl,method: DioMethod.get,data: {});
  }

  ///查询所有报警次数和设备数量
  static dynamic eqAndAlarmCount ()async{
    return await DioUtil.getInstance().request(eqAndAlarmCountUrl,method: DioMethod.get,data: {});
  }

  ///查询一段时间内，某一个设备的温湿度变化
  static dynamic queryTHByDeviceNo (formData)async{
    return await DioUtil.getInstance().request(queryTHByDeviceNoUrl,method: DioMethod.get,params: formData);
  }



}